package pt.ua.helpdesk.client;

import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Widget;

/**
 * Click handler that allow the user to view a ticket
 * @author Amigos do Noddy
 *
 */
public class TicketViewOnClick implements ClickListener 
{
	private Integer IDTicket;
	
	/**
	 * Class constructor
	 * @param id Ticket id
	 */
	public TicketViewOnClick(Integer id)
	{
		this.IDTicket = id;
	}
	
	/**
	 * Click listener. Loads the composite used
	 * to view a ticket
	 */
	public void onClick(Widget sender) 
	{
		Default.loadComposite(new TicketView(IDTicket));
		System.out.println("Id: "+IDTicket);
	}

}
